import { Meta } from '@storybook/addon-docs';

<Meta title="API Reference/Enumerators" id="api-enums" />

# Enumerators

React Data Table provides you with enums instead of using strings for various properties. These are optional with JavaScript but required when using a TypeScript project. In any case, use the enums when you can.

## Direction

- Direction.LTR = 'ltr'
- Direction.RTL = 'rtl'
- Direction.AUTO = 'auto'

```js
import DataTable { Direction } from 'react-data-table-Component';

<DataTable ... direction={Direction.AUTO} />
```

## Alignment

- LEFT = 'left'
- RIGHT = 'right'
- CENTER = 'center'

```js
import DataTable { Alignment } from 'react-data-table-Component';

<DataTable ... subHeaderAlign={Alignment.Center} />
```

## Media

- SM = 'sm'
- MD = 'md'
- LG = 'lg'

```js
import DataTable { Media } from 'react-data-table-Component';

const columns = [
	{
		name: 'Title',
		selector: row => row.title,
		hide: Media.SM
	}
];
```
